import {Service} from "adajs";

const MAP = ["局内转", "报人事局", "已批准", "已备案", "其他"];

class CourseService extends Service {
    defaultData() {
        return {
            list: []
        }
    }

    onupdate(current, {list}) {
        current.list = list;
        current.list = current.list.map(_item => {
            return Object.assign({}, _item, {
                state: MAP[_item.handleState] || '其他'
            });
        });
    }
}

export default CourseService;